Answer:

The complete program is below.

Arithmetic Expressions can use Subscripted Variables

Here is the complete program. Notice that SUM is computed by adding three subscripted variables. Remember that subscripted variables can be in the same ways that normal variables are used.

DIM RAIN(1 TO 3)                '  The array will store the rainfall
                                '
LET RAIN(1) = 3.54              '  Rainfall for day 1 
LET RAIN(2) = 0.0               '  Rainfall for day 2
LET RAIN(3) = 1.79              '  Rainfall for day 3

LET SUM = RAIN(1) + RAIN(2) + RAIN(3)      '  Add up the rainfall for all three days
LET AVG = SUM / 3

PRINT "The average rainfall was:", AVG, " inches"
END

In this program there is an arithmetic expression that uses subscripted variables.

RAIN(1) + RAIN(2) + RAIN(3)

It works the same as an arithmetic expression using ordinary variables. The contents of each variable is retrieved from main memory and used in the sum:

RAIN(1) + RAIN(2) + RAIN(3)

 3.54   +  0.0    +  1.79
 --------------   

     3.54         +  1.79
     --------------------

            5.33

QUESTION 13:

(Thought question:) Do you think that a subscripted variable can be used in an INPUT statement?